%%%-------------------------------------------------------------------
%%% @author patton.zhu
%%% @copyright (C) 2022, <COMPANY>
%%% @doc
%%%
%%% @end
%%% Created : 12. 5月 2022 11:52
%%%-------------------------------------------------------------------
-module(geometry).
-author("patton.zhu").

%% API
-export([area/1]).

area({rectangle, Width, Height}) -> Width*Height; %子句1
area({square, Side}) -> Side * Side.%子句2